import 'package:hotpot/generated/json/base/json_field.dart';
import 'package:hotpot/generated/json/table_order.g.dart';
import 'dart:convert';

@JsonSerializable()
class TableOrder {

	int? id;
	String? name;
	@JSONField(name: "date_order")
	String? dateOrder;
	List<TableOrderLines>? lines;
	@JSONField(name: "table_id")
	int? tableId;
	@JSONField(name: "tracking_number")
	String? trackingNumber;
  
  TableOrder();

  factory TableOrder.fromJson(Map<String, dynamic> json) => $TableOrderFromJson(json);

  Map<String, dynamic> toJson() => $TableOrderToJson(this);

  @override
  String toString() {
    return jsonEncode(this);
  }
}

@JsonSerializable()
class TableOrderLines {

	int? id;
	int? qty;
	@JSONField(name: "attribute_value_ids")
	List<int>? attributeValueIds;
	@JSONField(name: "price_unit")
	double? priceUnit;
	String? uuid;
	@JSONField(name: "price_subtotal")
	double? priceSubtotal;
	@JSONField(name: "price_subtotal_incl")
	double? priceSubtotalIncl;
	@JSONField(name: "product_id")
	int? productId;
	@JSONField(name: "refunded_qty")
	int? refundedQty;
	@JSONField(name: "price_extra")
	int? priceExtra;
	@JSONField(name: "full_product_name")
	String? fullProductName;
	String? note;
	@JSONField(name: "attribute_multi_value")
	Map<String, int>? attributeMultiValue;
	@JSONField(name: "vegetable_sequence_id")
	String? vegetableSequenceId;
	int? hasSend;
	@JSONField(name: "combo_line_ids")
	List<String>? comboLineIds;
	@JSONField(name: "combo_parent_id")
	String? comboParentId;
  
  TableOrderLines();

  factory TableOrderLines.fromJson(Map<String, dynamic> json) => $TableOrderLinesFromJson(json);

  Map<String, dynamic> toJson() => $TableOrderLinesToJson(this);

  @override
  String toString() {
    return jsonEncode(this);
  }
}

@JsonSerializable()
class TableOrderLinesAttributeMultiValue {


  
  TableOrderLinesAttributeMultiValue();

  factory TableOrderLinesAttributeMultiValue.fromJson(Map<String, dynamic> json) => $TableOrderLinesAttributeMultiValueFromJson(json);

  Map<String, dynamic> toJson() => $TableOrderLinesAttributeMultiValueToJson(this);

  @override
  String toString() {
    return jsonEncode(this);
  }
}